package com.sendi.annotation.report;
public class EnumCovert {
	
	 public static  String CoverFieldTyeToString(fieldTye f)
	 {
		 if(f==fieldTye.STRING)
		 {
			 return "STRING";
		 }
		 else if(f==fieldTye.INT)
		 {
			 return "INT";
		 }
		 else if(f==fieldTye.LONG)
		 {
			 return "LONG";
		 }
		 else if(f==fieldTye.DOUBLE)
		 {
			 return "DOUBLE";
		 }
		 else if(f==fieldTye.FLOAT)
		 {
			 return "FLOAT";
		 }
		 else if(f==fieldTye.DATE)
		 {
			 return "DATE";
		 }
		 else
		 {
			 return null;
		 }
			 
	 }

	 public static String CoverBoolToString(BOOL bool)
	 {
		 if(bool==BOOL.no)
		 {
			 return "no";
		 }
		 if(bool==BOOL.NO)
		 {
			 return "no";
		 }
		 if(bool==BOOL.yes)
		 {
			 return "yes";
		 }
		 if(bool==BOOL.YES)
		 {
			 return "yes";
		 }
		 
		 return null;
	 }
	 
	 public static String CoverGroupAction(GroupByAction ac)
	 {
		 if(ac==GroupByAction.AvgAction)
		 {
			 return "AvgAction";
		 }
		 if(ac==GroupByAction.CountAction)
		 {
			 return "CountAction";
		 }
		 if(ac==GroupByAction.MaxAction)
		 {
			 return "MaxAction";
		 }
		 if(ac==GroupByAction.MinAction)
		 {
			 return "MinAction";
		 }
		 if(ac==GroupByAction.SumAction)
		 {
			 return "SumAction";
		 }
		 return "NullAction";
		 
	 }
	 
	 public static String CovertGroupByType(GroupByType gb)
	 {
		 if(gb==GroupByType.asc)
		 {
			 return "asc";
		 }

		 if(gb==GroupByType.ASC)
		 {
			 return "ASC";
		 }
		 

		 if(gb==GroupByType.desc)
		 {
			 return "desc";
		 }
		 

		 if(gb==GroupByType.DESC)
		 {
			 return "DESC";
		 }
		 return null;
	 }
	 
	 public static String CovertSwithToString(SWITH sw)
	 {
		 if(sw==SWITH.off)
		 {
			 return "off";
		 }
		 if(sw==SWITH.OFF)
		 {
			 return "OFF";
		 }
		 if(sw==SWITH.on)
		 {
			 return "on";
		 }
		 
		 if(sw==SWITH.ON)
		 {
			 return "ON";
		 }
	 	 return null;
	 }

}
